﻿CREATE TABLE [dbo].[Credentials]
(
	[Id]			UNIQUEIDENTIFIER	NOT NULL, 
	[UserId]		BIGINT				NULL,
	[Login]         VARCHAR(256)		NOT NULL,
    [Password]      VARBINARY(MAX)		NOT NULL,
	[CreatedAt]		DATETIME			NOT NULL,
	[RevokedAt]		DATETIME			NULL,
	CONSTRAINT PK_Credentials PRIMARY KEY ([Id]),
	CONSTRAINT FK_Credentials_Users FOREIGN KEY ([UserId]) REFERENCES [dbo].[Users]([Id])
)
